import { ObjCreate } from "../../common/ObjCreate";
import { Language } from "../../../../../extend/language/Language";
import { Dispatcher } from "../../../../mvc/core/Dispatcher";
import { DataEvent } from "../../../events/DataEvent";
import { EventName } from "../../../mvc/EventName";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
import { GButton } from "../../../../../com/mui/controls/GButton";
//class SuitSkillTipPanel
    
    export  class SuitSkillTipPanel /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._tipTxt = ObjCreate.createGTextField("", 0, 0, 190, 20, this);
            this._tipTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._tipTxt.wordWrap = true;
            this._tipTxt.htmlText = Language.getString(36218);
            this._openBtn = ObjCreate.createGButton(Language.getString(36219), 120, 50, 70, 28, this);
            this._openBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onGetBtnClickHandler);
            return;
        }

        /* internal  */onGetBtnClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.PlayerSuitSkillOpen));
            Dispatcher.dispatchEvent(new DataEvent(EventName.MsgTipWindowHide));
            return;
        }

        public updateTips(arg1: string): void
        {
            if (arg1 != "RedGold") 
            {
                if (arg1 == "Red") 
                {
                    this._tipTxt.htmlText = Language.getString(36218);
                }
            }
            else 
            {
                this._tipTxt.htmlText = Language.getString(36224);
            }
            return;
        }

        /* internal */ /* var */_tipTxt: GTextFiled;

        /* internal */ /* var */_openBtn: GButton;
    }
